<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    .contain{
        width: 100px;
        height: 100px;
        margin :50px auto;
        border: 10px solid red;
        outline: 10px dotted orange;
        position: relative;
    }
    .contain::after{
        content: "";
        display: block;
        width: 80px;
        height: 80px;
        border: 10px solid green;
        position: absolute;
    }
    .contain::before{
        content:"";
        display: block;
        width: 60px;
        height: 60px;
        border: 10px dashed pink;
        position: absolute;
        top: 10px;
        left: 10px;

    }
    </style>
</head>
<body>
    <div class="contain"></div>
</body>
</html>